package proxy.demo1;

/**
 * 静态代理类,需要实现IUserDao接口
 *
 * @author 1
 * @version 1.0
 * @description: TODO
 * @date 2024-08-27 10:28
 */
public class UserDaoProxy implements IUserDao {
    private IUserDao target;

    /**
     * 构造方法进行目标对象的注入
     *
     * @param target
     */
    public UserDaoProxy(IUserDao target) {
        this.target = target;
    }


    public void save() {
        System.out.println("增强代码开始了...........");
        target.save();
        System.out.println("增强代码结束了...........");
    }
}
